﻿@using TinyMoocSite.ViewModels
@model DiscussVM

@{
    ViewBag.Title = Model.Title + "|交流空间";
    Layout = "~/Views/Student/CoursePageLayout.cshtml";
}

@section Discuss { active }

@section RightContainer
{
    <h4>交流空间</h4><hr />
    <a href="/Student/AddDiscuss?CourseId=@Model.Id" class="btn btn-primary">创建新帖子</a>
    <br /><br />

    <table class="table">
        <thead>
            <tr>
                <th>编号</th>
                <th>帖子标题</th>
                <th>发起者</th>
                <th>创建时间</th>
                <th>回复次数</th>
            </tr>
        </thead>
        <tbody>
            @foreach (DiscussShortItem item in Model.DiscussList)
            {
                <tr>
                    <td>@item.Id</td>
                    <td><a href="/Student/DiscussContent?CourseId=@Model.Id&DiscussId=@item.Id">@item.PostTitle</a></td>
                    <td>@item.Owner</td>
                    <td>@item.PostDate</td>
                    <td>@item.ReplyCount</td>
                </tr>
            }

        </tbody>
    </table>
}


